<template>
  <!-- <el-menu
    default-active="2"
    class="el-menu-vertical-demo"
    :collapse="collapse"
  >
    <el-menu-item index="1">
      <el-icon-menu></el-icon-menu>
      <template #title><router-link to="/">首页</router-link></template>
    </el-menu-item>
    <el-menu-item index="2">
      <el-icon-select />
      <template #title><router-link to="/chooseIcon">选择图标</router-link></template>
    </el-menu-item>
    <el-menu-item index="3">
      <el-icon-position />
      <template #title><router-link to="/chooseArea">选择地区</router-link></template>
    </el-menu-item>
    <el-menu-item index="4">
      <el-icon-arrowup />
      <template #title><router-link to="/trend">趋势图标</router-link></template>
    </el-menu-item>
    <el-menu-item index="5">
      <el-icon-bell></el-icon-bell>
      <template #title><router-link to="/notification">通知</router-link></template>
    </el-menu-item>
    <el-menu-item index="6">
      <el-icon-menu></el-icon-menu>
      <template #title><router-link to="/menu">菜单导航</router-link></template>
    </el-menu-item>
  </el-menu> -->

  <m-menu :data="data" :collapse="collapse" router :defaultActive="$route.path"></m-menu>
</template>

<script lang="ts" setup >
let props = defineProps<{
  collapse: boolean;
}>();

let data = [
  {
    icon: "house",
    name: "首页",
    index: "/"
  },
  {
    icon: "select",
    name: "选择图标",
    index: "/chooseIcon"
  },
  {
    icon: "position",
    name: "选择地区",
    index: "/chooseArea"
  },
  {
    icon: "arrowup",
    name: "趋势图标",
    index: "/trend"
  },
  {
    icon: "bell",
    name: "通知",
    index: "/notification"
  },
  {
    icon: "menu",
    name: "菜单导航",
    index: "/menu"
  },
  {
    icon: "timer",
    name: "选择时间",
    index: "/time"
  },
  {
    icon: "refreshleft",
    name: "进度条",
    index: "/progress"
  },
  {
    icon: "promotion",
    name: "选择城市",
    index: "/chooseCity"
  },
  {
    icon: 'Setting',
    name: '表单',
    index: '/form'
  },
  {
    icon: 'Setting',
    name: '弹出框表单',
    index: '/modalForm'
  },
  {
    icon: 'grid',
    name: '表格',
    index: '/table'
  }
];
</script>

<style scoped lang="scss">

</style>
